#include <stdio.h>
#include <string.h>

int main(int argc,char** args){
	FILE* fp=fopen(".\\arg.log","w+");
	if(argc>1){
		for(int i=0;i<argc;i++){
			if(strstr(args[i],"-l")!=NULL){
				printf("Found DFU: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=0, name=\"\"\r\n");
				printf("Found DFU: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=1, name=\"STM32duino bootloader v1.0  Upload to Flash 0x8005000\"\r\n");
				printf("Found DFU: [0x1eaf:0x0003] devnum=1, cfg=0, intf=0, alt=2, name=\"STM32duino bootloader v1.0  Upload to Flash 0x8002000\"\r\n");
				break;
			}
		}

	}
	if(fp!=NULL){
		for(int i=0;i<argc;i++){
			fprintf(fp,"arg[%d]:%s\r\n",i,args[i]);
		}
	}
}